import 'package:flutter/material.dart';

class SizeBoxExample extends StatefulWidget {
  const SizeBoxExample({Key? key}) : super(key: key);

  @override
  State<SizeBoxExample> createState() => _SizeBoxExampleState();
}

class _SizeBoxExampleState extends State<SizeBoxExample> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.greenAccent,
      appBar: AppBar(
        title: Text('SizeBoxExample'),
      ),
      body: SizedBox(
        // child: SizedBox(
        //   width: 200.0,
        //   height: 300.0,
        //   child: Card(child: Text('Hello World!')),
        // ),
        // child: SizedBox.expand(
        //   child: Card(child: Text('Hello World!')),
        // ),
        // child: SizedBox.shrink(
        //   child: Card(child: Text('Hello World!')),
        // ),
        // child: SizedBox.fromSize(
        //   size: Size(200, 300),
        //   child: Card(child: Text("Hello World")),
        // ),
        child: SizedBox.fromSize(
          child: Card(child: Text('Hello World')),
        ),
      ),
    );
  }
}
